<!--<div id="infoMessage"><?php echo $message;?></div>-->
<h3>Fedobe Founders</h3>
<table class="table table-striped table-bordered" width="100%" >
	<thead>
    <tr>
		<th>First Name</th>
		<th>Last Name</th>
		<th>Email</th>
		<th>Role</th>        
		<th>Status</th>
		<th>Action</th>
	</tr>
    </thead>
	<?php foreach ($founders as $founders):?>
		<tr>
			<td><?php echo $founders->first_name;?></td>
			<td><?php echo $founders->last_name;?></td>
			<td><?php echo $founders->email;?></td>
			<td>
				<?php foreach ($founders->groups as $group):?>
					<?= $group->name?><br />
                <?php endforeach?>
			</td>
                 
			<td><?php echo ($founders->active) ? anchor("auth/deactivate/".$founders->id, 'Active') : anchor("auth/activate/". $founders->id, 'Inactive');?></td>
			<td><?php echo anchor("auth/edit_user/".$founders->id, 'Edit') ;?></td>
			
		</tr>
	<?php endforeach;?>
    <tfoot>
    <tr>
		<th>First Name</th>
		<th>Last Name</th>
		<th>Email</th>
		<th>Role</th>		
		<th>Status</th>
		<th>Action</th>
	</tr>
    </tfoot>
</table>

<h3>Fedobe Employes  <small class="label"><a href="<?php echo site_url('founder/user/add_user');?>"><i class="icon-plus"></i> Add New User</a></small> </h3>
<span class="pull-right"><a href="<?php echo site_url('founder/attendance/attendance_details/'.date('y').'/'.date('m'))?>">All Attendance</a> </span>
<table class="table table-striped table-bordered" id="example">
	<thead>
    <tr>
		<th>First Name</th>
		<th>Last Name</th>
		<th>Email</th>
		<th>Role</th>
        <th>Department</th>
        <th>User Type</th>
		<th>Daily</th>
		<th>Status</th>
		<th>Action</th>
	</tr>
    </thead>
	<?php foreach ($users as $user):?>
		<tr>
			<td><?php echo $user->first_name;?></td>
			<td><?php echo $user->last_name;?></td>
			<td><?php echo $user->email;?></td>
			<td>
				<?php foreach ($user->groups as $group):?>
					<?= $group->name?><br />
                <?php endforeach?>
			</td>
            <td>
            <?php foreach ($user->department as $user_type):?>
					<?=$user_type->name?><br />
                <?php endforeach?>
            </td>
            <td>            
           <?php foreach ($user->user_type as $user_type):?>
					<?=$user_type->name ?><br />
                <?php endforeach?>    
           </td> 
		   <td>
		   <?php echo anchor("founder/attendance/index/".$user->id.'/'.date('y').'/'.date('m'), 'Attendance') ;?> / 
		   <?php echo anchor("user/worksheet/index/".$user->id.'/'.date('y').'/'.date('m'), 'Worksheet') ;?>				
		   </td>           
			<td><?php echo ($user->active) ? anchor("auth/deactivate/".$user->id, 'Active') : anchor("auth/activate/". $user->id, 'Inactive');?></td>
			<td><?php echo anchor("auth/edit_user/".$user->id, 'Edit') ;?> / <?php echo anchor("founder/jobprofile/addprofile/".$user->id, 'Job Profile') ;?></td>
			
		</tr>
	<?php endforeach;?>
    <tfoot>
    <tr>
		<th>First Name</th>
		<th>Last Name</th>
		<th>Email</th>
		<th>Role</th>
        <th>Department</th>
        <th>User Type</th>
		<th>Daily</th>
		<th>Status</th>
		<th>Action</th>
	</tr>
    </tfoot>
</table>

<h3>Fedobe Client   <small class=""><a href="<?php echo site_url('client/client/add_client');?>"><i class="icon-plus"></i> Add New Client</a></small></h3>
<!--<?= print_r($clients);?>-->
<table class="table table-striped table-bordered" width="100%" id="example">
	<thead>
    <tr>
		<th>Name</th>
		<th>Email / Username</th>
		<th>Phone</th>
		<th>Company</th>
		<th>Status</th>
		<th>Action</th>
	</tr>
    </thead>
	<?php foreach($clients as $client):?>
	<tr>
		<td><?= $client->username?></td>
		<td><?= $client->email?></td>
		<td><?= $client->phone?></td>
		<td><?= $client->company?></td>		  	
		<td><?php echo ($user->active) ? anchor("auth/deactivate/".$user->id, 'Active') : anchor("auth/activate/". $user->id, 'Inactive');?></td>
		<td><?php echo anchor("auth/edit_user/".$client->id, 'Edit') ;?></td>
	</tr>
	<?php endforeach;?>
</table>
<!--<p><a href="<?php echo site_url('auth/create_user');?>">Create a new user</a> | <a href="<?php echo site_url('auth/create_group');?>">Create a new group</a>
<a href="<?php echo site_url('auth/logout');?>">Logout</a>
</p>-->
